.. _ocaagent: 1.2 OcaAgent ============= Class Hierarchy: :ref:`OcaRoot ` :raw:html:`→` :ref:`OcaAgent ` .. cpp:class:: OcaAgent: OcaRoot Abstract base class for defining agents. **Properties**: .. _ocaagent_classid: .. cpp:member:: static const OcaClassID ClassID = "1.2" Number that uniquely identifies the class. Note that this differs from the object number, which identifies the instantiated object. This property is an override of the **OcaRoot** property. This property has id ``2.1``. .. _ocaagent_classversion: .. cpp:member:: static const OcaClassVersionNumber ClassVersion = 2 Identifies the interface version of the class. Any change to the class definition leads to a higher class version. This property is an override of the **OcaRoot** property. This property has id ``2.2``. .. _ocaagent_label: .. cpp:member:: OcaString Label User-specified label. This property has id ``2.1``. .. _ocaagent_owner: .. cpp:member:: OcaONo Owner Object number of block that contains this agent. This property has id ``2.2``. Properties inherited from :ref:`OcaRoot `: - :cpp:texpr:`OcaONo` :ref:`OcaRoot::ObjectNumber ` - :cpp:texpr:`OcaBoolean` :ref:`OcaRoot::Lockable ` - :cpp:texpr:`OcaString` :ref:`OcaRoot::Role ` **Methods**: .. _ocaagent_getlabel: .. cpp:function:: OcaStatus GetLabel(OcaString &Label) Gets the value of the Label property. The return value indicates whether the property was successfully retrieved. This method has id ``2.1``. :param OcaString Label: Output parameter. .. _ocaagent_setlabel: .. cpp:function:: OcaStatus SetLabel(OcaString Label) Sets the value of the Label property. The return value indicates whether the property was successfully set. This method has id ``2.2``. :param OcaString Label: Input parameter. .. _ocaagent_getowner: .. cpp:function:: OcaStatus GetOwner(OcaONo &owner) Gets the value of the Owner property. The return value indicates whether the property was successfully retrieved. This method has id ``2.3``. :param OcaONo owner: Output parameter. .. _ocaagent_getpath: .. cpp:function:: OcaStatus GetPath(OcaNamePath &NamePath, OcaONoPath &ONoPath) Returns path from the given object down to root. The return value indicates whether the operation succeeded. Added in version 2. This method has id ``2.4``. :param OcaNamePath NamePath: Output parameter. :param OcaONoPath ONoPath: Output parameter. Methods inherited from :ref:`OcaRoot `: - :ref:`OcaRoot::GetClassIdentification(ClassIdentification) ` - :ref:`OcaRoot::GetLockable(lockable) ` - :ref:`OcaRoot::LockTotal() ` - :ref:`OcaRoot::Unlock() ` - :ref:`OcaRoot::GetRole(Role) ` - :ref:`OcaRoot::LockReadonly() `